#include <iostream>
#include <deque>
using namespace std;

struct node{
    int x,y,z;
};


int main(){
    deque<node> q;
    for(int i = 1;i <= 10;i++){
        q.push_front(node{i,i*2,i*3});
    }
    while(!q.empty()){
        auto t = q.front();
        cout << t.x << " " << t.y << " " << t.z << endl;
        q.pop_front();
    }
    return 0;    
}
